﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

public partial class mobile_xiaofeijl : System.Web.UI.Page
{
    public string ind_id;
    
    protected void Page_Load(object sender, EventArgs e)
    {
        ind_id = this.Request.Params["ind"].ToString();
        SqlConnection sc = new SqlConnection(ConfigurationManager.ConnectionStrings["wbkpt"].ConnectionString.ToString());
        sc.Open();
        SqlCommand sc1 = new SqlCommand();
        //利用IND_ID在PRODUCT_SALE表中查找所有记录
        sc1.CommandText = "select INFO_IND.IND_NAME,INFO_PRODUCT.PRODUCT_NAME,PRODUCT_SALE.SUM,PRODUCT_SALE.SALE_DATE from PRODUCT_SALE,INFO_PRODUCT,INFO_IND where INFO_IND.IND_ID=PRODUCT_SALE.IND_ID and INFO_IND.IND_ID=@id and INFO_PRODUCT.PRODUCT_ID=PRODUCT_SALE.PRODUCT_ID";
        sc1.Connection = sc;
        sc1.Parameters.AddWithValue("@id", ind_id);
        SqlDataReader reader = sc1.ExecuteReader();
        GridView1.DataSource = reader;
        GridView1.DataBind();
        sc.Close();

    }
}